package com.imc.platform.base.common.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by tanweiping on 2018/8/1.
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
//@Entity
//@Table(name = "t_identifycode")
public class IdentifyCode implements Serializable{

    private static final long serialVersionUID = 5231134212346077681L;

    /**
     * 编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;

    /*
    0,有效
    -1,无效
     */
    @Builder.Default
    private String valid = "0";

    private String code;

    /*
    字符 char
    图形位置 position
     */
    @Builder.Default
    private String  type = "position";

    /**
     * 生效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "effectTime")
    private Date effectTime;

    /**
     * 失效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "invalidTime")
    private Date invalidTime;

    /**
     * 创建人
     */
    private String userName;
}
